﻿using UnityEngine;
using System.Collections;

public class DistanceTwoObject : MonoBehaviour {

	public Transform Obj1;
	public Transform Obj2;

	void Start()
	{
		float dist = (Obj1.position - Obj2.position).magnitude;
		float sqrtDist = (Obj1.position - Obj2.position).sqrMagnitude;
		Debug.Log("dist= "+dist+"   sqrtDist="+sqrtDist);
	}
}
